<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Vue页面结构</title>
    <script src="./lib/vue-2.4.0.js"></script>
    <script src="https://cdn.bootcss.com/axios/0.18.0/axios.min.js"></script>
    <link rel="stylesheet" href="./lib/bootstrap-3.3.7.css">
    <style>
        img{
            width: 100%;
            height: 100%;
        }
    </style>
</head>
<body>
    <div id="app" class="container">
        <div class="row">
                <div class="col-md-3" v-for="(item,key) in list">
                    <img class="img-rounded" :src="item.url" alt="">
                </div>
        </div>
    </div>
</body>
<script>
    var vm=new Vue({
        el:'#app',
        data:{
            list:[]    
        },
        methods:{
            getImgs:function(){
                axios.get('https://www.apiopen.top/meituApi?page=1').then((res)=>{
                   if(res.status==200){
                    console.log(res.data.data);
                    this.list=res.data.data;
                   }
                    
                });
            }
        },
        //生命周期函数
        created:function(){
            this.getImgs();
        },
        mounted:function(){
        }
    });
</script>
</html>